<metadata>
  <!--
  This sample removes the class: android.support.v4.content.AsyncTaskLoader.LoadTask:
  <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" />
  
  This sample removes the method: android.support.v4.content.CursorLoader.loadInBackground:
  <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" />
  -->
  <!-- Rename namespaces to remove initial "com" -->
  <attr path="/api/package[@name='com.hoho.android.usbserial']" name="managedName">Hoho.Android.UsbSerial</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']" name="managedName">Hoho.Android.UsbSerial.Driver</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.util']" name="managedName">Hoho.Android.UsbSerial.Util</attr>

  <!-- Remove troubling classes -->
  <remove-node path="/api/package[@name='com.hoho.android.usbserial.util']/class[@name='SerialInputOutputManager']" />
  <remove-node path="/api/package[@name='com.hoho.android.usbserial.util']/interface[@name='SerialInputOutputManager.Listener']" />
  <remove-node path="/api/package[@name='com.hoho.android.usbserial.util']/class[@name='SerialInputOutputManager.State']" />

  <!-- CommonUsbSerialPort -->
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/class[@name='CommonUsbSerialPort']" name="visibility">public</attr>

  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/class[@name='CommonUsbSerialPort']/method[@name='setReadBufferSize' and count(parameter)=1 and parameter[1][@type='int']]" name="final">false</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/class[@name='CommonUsbSerialPort']/method[@name='setWriteBufferSize' and count(parameter)=1 and parameter[1][@type='int']]" name="final">false</attr>

  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/class[@name='CommonUsbSerialPort']/method[@name='setParameters' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='int'] and parameter[4][@type='int']]/parameter[@name='p0']" name="name">baudRate</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/class[@name='CommonUsbSerialPort']/method[@name='setParameters' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='int'] and parameter[4][@type='int']]/parameter[@name='p1']" name="name">dataBits</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/class[@name='CommonUsbSerialPort']/method[@name='setParameters' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='int'] and parameter[4][@type='int']]/parameter[@name='p2']" name="name">stopBits</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/class[@name='CommonUsbSerialPort']/method[@name='setParameters' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='int'] and parameter[4][@type='int']]/parameter[@name='p3']" name="name">parity</attr>

  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/class[@name='CommonUsbSerialPort']/method[@name='write' and count(parameter)=2 and parameter[1][@type='byte[]'] and parameter[2][@type='int']]/parameter[@name='p0']" name="name">src</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/class[@name='CommonUsbSerialPort']/method[@name='write' and count(parameter)=2 and parameter[1][@type='byte[]'] and parameter[2][@type='int']]/parameter[@name='p1']" name="name">timeoutMillis</attr>

  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/class[@name='CommonUsbSerialPort']/method[@name='read' and count(parameter)=2 and parameter[1][@type='byte[]'] and parameter[2][@type='int']]/parameter[@name='p0']" name="name">dest</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/class[@name='CommonUsbSerialPort']/method[@name='read' and count(parameter)=2 and parameter[1][@type='byte[]'] and parameter[2][@type='int']]/parameter[@name='p1']" name="name">timeoutMillis</attr>

  <!-- UsbSerialPort -->
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/interface[@name='UsbSerialPort']/method[@name='setParameters' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='int'] and parameter[4][@type='int']]/parameter[@name='p0']" name="name">baudRate</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/interface[@name='UsbSerialPort']/method[@name='setParameters' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='int'] and parameter[4][@type='int']]/parameter[@name='p1']" name="name">dataBits</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/interface[@name='UsbSerialPort']/method[@name='setParameters' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='int'] and parameter[4][@type='int']]/parameter[@name='p2']" name="name">stopBits</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/interface[@name='UsbSerialPort']/method[@name='setParameters' and count(parameter)=4 and parameter[1][@type='int'] and parameter[2][@type='int'] and parameter[3][@type='int'] and parameter[4][@type='int']]/parameter[@name='p3']" name="name">parity</attr>

  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/interface[@name='UsbSerialPort']/method[@name='write' and count(parameter)=2 and parameter[1][@type='byte[]'] and parameter[2][@type='int']]/parameter[@name='p0']" name="name">src</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/interface[@name='UsbSerialPort']/method[@name='write' and count(parameter)=2 and parameter[1][@type='byte[]'] and parameter[2][@type='int']]/parameter[@name='p1']" name="name">timeoutMillis</attr>

  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/interface[@name='UsbSerialPort']/method[@name='read' and count(parameter)=2 and parameter[1][@type='byte[]'] and parameter[2][@type='int']]/parameter[@name='p0']" name="name">dest</attr>
  <attr path="/api/package[@name='com.hoho.android.usbserial.driver']/interface[@name='UsbSerialPort']/method[@name='read' and count(parameter)=2 and parameter[1][@type='byte[]'] and parameter[2][@type='int']]/parameter[@name='p1']" name="name">timeoutMillis</attr>
</metadata>
